package demo.java.mail;

/**
 * @author Arnold Yand
 * @since Jun 15, 2017 9:15:38 PM
 * @summary demo.java.mail.PROTOCOL.java
 */
public enum PROTOCOL {

  imap(Account.EMAIL, Account.PASSWORD, "imap.exmail.qq.com", 993), 
  smtp(Account.EMAIL, Account.PASSWORD, "smtp.exmail.qq.com", 465), 
  pop3(Account.EMAIL, Account.PASSWORD, "pop.exmail.qq.com", 995);

  PROTOCOL(String email, String password, String host, int port) {
    this.email = email;
    this.password = password;
    this.host = host;
    this.port = port;
  }

  private String email;
  private String password;
  private String host;
  private int port;

  public String getEmail() {
    return email;
  }

  public String getPassword() {
    return password;
  }

  public String getHost() {
    return host;
  }

  public int getPort() {
    return port;
  }

  private class Account {
    private static final String EMAIL = "yangchangyan@yijiedai.com";
    private static final String PASSWORD = "Yjd123#";
  }

}
